

*************************************************************************************************************************************************************
**REPLICATION FILE
**Ferrín, Mónica, García-Albacete, Gema & Irene Sánchez-Vítores, How long does it take to admit that you don't know? Gender differences in response time to political knowledge questions
*************************************************************************************************************************************************************

*******************************************
*DATA MANAGEMENT
*******************************************

***Independent variables
*education
recode p4 (1/2=1) (3=2) (4/5=3) (6=4) (7=5), gen(educa)
lab define educa 1"Primary or less" 2"First stage secondary education" 3 "Finished secondary education" 4"Vocational training" 5"University studies"
lab val educa educa
gen educ_r=educ
recode educ_r (1/2=1) (3/4=2)  (5=3)
label define edre 1 "primary" 2 "secondary" 3 "university"
label value educ_r edre
tab educ_r

*age
rename p2 age

*political interest
tab p9
recode p9 (1/2=1) (3/4=0) (8=.), gen(polint)
tab p9 polint

*gender
recode p1 (1=0) (2=1), gen(female)

*self-assessment political information
recode p12 (1=3) (2=2) (3=1) (4=0) (8=.), gen(sde1)
recode sde1 (0/1=0) (2/3=1), gen(sde1_r)

*high need for cognition (nfc)
recode xp14_1 (1=5) (2=4) (4=2) (5=1) (8=.), gen(nfc1)
recode xp14_6 (1=5) (2=4) (4=2) (5=1) (8=.), gen(nfc2)
egen nfc=rowmean(nfc1 nfc2) 
sum nfc
gen nfc_d=1 if nfc>3.35
replace nfc_d=0 if nfc<=3.35 



***Dependent variable

**correct, incorrect, DK
*parliament (k1)
tab p20
gen t1k1=p20
recode t1k1 (1=0) (2=1) (3/4=0) (8=2) (999=2) (.=2)
lab define correct 0"Incorrect" 1"Correct" 2"DK"
lab val t1k1 correct

*right to vote (k2)
tab p21
gen t1k2=p21
recode t1k2 (1/3=0) (4=1) (8=2)(999=2) (.=2)
lab val t1k2 correct

*number MPs (k3)
tab p22 , nol
recode p22 (1/2=0) (3=1) (4=0) (8=2) (999=2) (.=2), gen(t1k3)

*quotas (k4)
tab p23
recode p23 (1/2=0) (3=1) (4=0) (8=2) (999=2) (.=2), gen(t1k4)

*unemployment(K5)
tab p28
recode p28 (1=0) (2=1) (3/4=0) (8=2) (999=2) (.=2), gen(t1k5)

*IPC (K6)
tab p29
recode p29 (1=0) (2=1) (3/4=0) (8=2) (999=2) (.=2), gen(t1k6)

*Bescansa (l1)
tab p24_1
recode p24_1 (1/2=0) (3=1) (4/8=0) (9=2)(999=2) (.=2), gen(t1l1)

*Errejón (l2)
tab p24_4
recode p24_4 (1/2=0) (3=1) (4/8=0) (9=2) (999=2) (.=2), gen(t1l2)

*Garzón (l3)
tab p24_3
recode p24_3 (1=0) (2=1) (3/8=0) (9=2) (999=2) (.=2), gen(t1l3)

*Lorenzo (l4)
tab p24_7
recode p24_7 (1/4=0) (5=1) (6/8=0) (9=2) (999=2) (.=2), gen(t1l4)

* Madina (l5)
tab p24_2
recode p24_2 (1/4=0) (5=1) (6/8=0) (9=2) (999=2) (.=2), gen(t1l5)

* Rivera de la Cruz (l6)
tab p24_6
recode p24_6 (2/8=0) (1=1) (9=2) (999=2) (.=2), gen(t1l6)

*Pablo Casado (l7)
tab p24_5
recode p24_5 (1/3=0) (4=1) (5/5=0) (8=0) (9=2) (999=2) (.=2), gen (t1l7)

*Francisco de la Torre (l8)
tab p24_8
recode p24_8 (2/8=0) (1=1) (9=2) (999=2) (.=2), gen(t1l8)

*Isabel García Tejerina (l9)
tab p24_9
recode p24_9 (1/3=0) (4=1) (5/5=0) (8=0) (9=2) (999=2) (.=2), gen (t1l9)

*psoe (condenados maltrato)
tab p27_1
recode p27_1 (1=0) (2=1) (3/5=0) (8=2) (999=2) (.=2), gen(t1s1)

*diputaciones (ciudadanos)
tab p27_2
recode p27_2 (1/2=0) (3=1) (4/5=0) (8=2) (999=2) (.=2), gen(t1s2)

*sucesiones(pp)
tab p27_3
recode p27_3 (1=1) (2/5=0) (8=2) (999=2) (.=2), gen(t1s3)

*incumplimiento (Podemos)
tab p27_4
recode p27_4 (1/3=0) (4=1) (5=0) (8=2) (999=2) (.=2), gen(t1s4)


**summary correct, incorrect, dk
*correct
egen correct_t1=anycount (t1k1 t1k2 t1k3 t1k4 t1k5 t1k6 t1l1 t1l2 t1l3 t1l4 t1l5 t1l6 t1l7 t1l8 t1l9 t1s1 t1s2 t1s3 t1s4), val(1)

*incorrect 
egen incorrect_t1_inc=anycount (t1k1 t1k2 t1k3 t1k4 t1k5 t1k6 t1s1 t1s2 t1s3 t1s4 t1l1 t1l2 t1l3 t1l4 t1l5 t1l6 t1l7 t1l8 t1l9), val(0)

*dk 
egen dk_t1=anycount (t1k1 t1k2 t1k3 t1k4 t1k5 t1k6 t1s1 t1s2 t1s3 t1s4 t1l1 t1l2 t1l3 t1l4 t1l5 t1l6 t1l7 t1l8 t1l9), val(2)


**Response time use by type of answer
gen p20timeI=.
replace p20timeI=p20_tiempo_respuesta if t1k1==0
gen p20timeC=.
replace p20timeC=p20_tiempo_respuesta if t1k1==1
gen p20timeDK=.
replace p20timeDK=p20_tiempo_respuesta if t1k1==2

gen p21timeI=.
replace p21timeI=p21_tiempo_respuesta if t1k2==0
gen p21timeC=.
replace p21timeC=p21_tiempo_respuesta if t1k2==1
gen p21timeDK=.
replace p21timeDK=p21_tiempo_respuesta if t1k2==2

gen p22timeI=.
replace p22timeI=p22_tiempo_respuesta if t1k3==0
gen p22timeC=.
replace p22timeC=p22_tiempo_respuesta if t1k3==1
gen p22timeDK=.
replace p22timeDK=p22_tiempo_respuesta if t1k3==2

gen p23timeI=.
replace p23timeI=p23_tiempo_respuesta if t1k4==0
gen p23timeC=.
replace p23timeC=p23_tiempo_respuesta if t1k4==1
gen p23timeDK=.
replace p23timeDK=p23_tiempo_respuesta if t1k4==2

gen p28timeI=.
replace p28timeI=p28_tiempo_respuesta if t1k5==0
gen p28timeC=.
replace p28timeC=p28_tiempo_respuesta if t1k5==1
gen p28timeDK=.
replace p28timeDK=p28_tiempo_respuesta if t1k5==2

gen p29timeI=.
replace p29timeI=p29_tiempo_respuesta if t1k6==0
gen p29timeC=.
replace p29timeC=p29_tiempo_respuesta if t1k6==1
gen p29timeDK=.
replace p29timeDK=p29_tiempo_respuesta if t1k6==2

gen p24_1timeI=.
replace p24_1timeI=p24_1_tiempo_respuesta if t1l1==0
gen p24_1timeC=.
replace p24_1timeC=p24_1_tiempo_respuesta if t1l1==1
gen p24_1timeDK=.
replace p24_1timeDK=p24_1_tiempo_respuesta if t1l1==2
 
gen p24_4timeI=.
replace p24_4timeI=p24_4_tiempo_respuesta if t1l2==0
gen p24_4timeC=.
replace p24_4timeC=p24_4_tiempo_respuesta if t1l2==1
gen p24_4timeDK=.
replace p24_4timeDK=p24_4_tiempo_respuesta if t1l2==2
 
gen p24_3timeI=.
replace p24_3timeI=p24_3_tiempo_respuesta if t1l3==0
gen p24_3timeC=.
replace p24_3timeC=p24_3_tiempo_respuesta if t1l3==1
gen p24_3timeDK=.
replace p24_3timeDK=p24_3_tiempo_respuesta if t1l3==2

gen p24_7timeI=.
replace p24_7timeI=p24_7_tiempo_respuesta if t1l4==0
gen p24_7timeC=.
replace p24_7timeC=p24_7_tiempo_respuesta if t1l4==1
gen p24_7timeDK=.
replace p24_7timeDK=p24_7_tiempo_respuesta if t1l4==2

gen p24_2timeI=.
replace p24_2timeI=p24_2_tiempo_respuesta if t1l5==0
gen p24_2timeC=.
replace p24_2timeC=p24_2_tiempo_respuesta if t1l5==1
gen p24_2timeDK=.
replace p24_2timeDK=p24_2_tiempo_respuesta if t1l5==2

gen p24_6timeI=.
replace p24_6timeI= p24_6_tiempo_respuesta if t1l6==0
gen p24_6timeC=.
replace p24_6timeC= p24_6_tiempo_respuesta if t1l6==1
gen p24_6timeDK=.
replace p24_6timeDK= p24_6_tiempo_respuesta if t1l6==2

gen p24_5timeI=.
replace p24_5timeI=p24_5_tiempo_respuesta if t1l7==0
gen p24_5timeC=.
replace p24_5timeC=p24_5_tiempo_respuesta if t1l7==1
gen p24_5timeDK=.
replace p24_5timeDK=p24_5_tiempo_respuesta if t1l7==2

gen p24_8timeI=.
replace p24_8timeI=p24_8_tiempo_respuesta if t1l8==0
gen p24_8timeC=.
replace p24_8timeC=p24_8_tiempo_respuesta if t1l8==1
gen p24_8timeDK=.
replace p24_8timeDK=p24_8_tiempo_respuesta if t1l8==2

gen p24_9timeI=.
replace p24_9timeI= p24_9_tiempo_respuesta if t1l9==0
gen p24_9timeC=.
replace p24_9timeC= p24_9_tiempo_respuesta if t1l9==1
gen p24_9timeDK=.
replace p24_9timeDK= p24_9_tiempo_respuesta if t1l9==2

gen p27_1timeI=.
replace p27_1timeI=p27_1_tiempo_respuesta if t1s1==0
gen p27_1timeC=.
replace p27_1timeC=p27_1_tiempo_respuesta if t1s1==1
gen p27_1timeDK=.
replace p27_1timeDK=p27_1_tiempo_respuesta if t1s1==2

gen p27_2timeI=.
replace p27_2timeI=p27_2_tiempo_respuesta if t1s2==0
gen p27_2timeC=.
replace p27_2timeC=p27_2_tiempo_respuesta if t1s2==1
gen p27_2timeDK=.
replace p27_2timeDK=p27_2_tiempo_respuesta if t1s2==2

gen p27_3timeI=.
replace p27_3timeI=p27_3_tiempo_respuesta if t1s3==0
gen p27_3timeC=.
replace p27_3timeC=p27_3_tiempo_respuesta if t1s3==1
gen p27_3timeDK=.
replace p27_3timeDK=p27_3_tiempo_respuesta if t1s3==2

gen p27_4timeI=.
replace p27_4timeI=p27_4_tiempo_respuesta if t1s4==0
gen p27_4timeC=.
replace p27_4timeC=p27_4_tiempo_respuesta if t1s4==1
gen p27_4timeDK=.
replace p27_4timeDK=p27_4_tiempo_respuesta if t1s4==2

*total response time
egen t1incorrect=rowtotal(p20timeI p21timeI p22timeI p23timeI p28timeI p29timeI p24_1timeI p24_4timeI p24_3timeI p24_7timeI p24_2timeI p24_6timeI p24_5timeI p24_8timeI p24_9timeI p27_1timeI p27_2timeI p27_3timeI p27_4timeI), m
egen t1correct=rowtotal(p20timeC p21timeC p22timeC p23timeC p28timeC p29timeC p24_1timeC p24_4timeC p24_3timeC p24_7timeC p24_2timeC p24_6timeC p24_5timeC p24_8timeC p24_9timeC p27_1timeC p27_2timeC p27_3timeC p27_4timeC), m
egen t1DK=rowtotal(p20timeDK p21timeDK p22timeDK p23timeDK p28timeDK p29timeDK p24_1timeDK p24_4timeDK p24_3timeDK p24_7timeDK p24_2timeDK p24_6timeDK p24_5timeDK p24_8timeDK p24_9timeDK p27_1timeDK p27_2timeDK p27_3timeDK p27_4timeDK), m
sum t1incorrect t1correct t1DK

*response time corrected by the number of answers of each type provided by the respondent
gen t1incorrectW=t1incorrect/incorrect_t1_inc
gen t1correctW=t1correct/correct_t1
gen t1DKW=t1DK/dk_t1
sum t1incorrectW t1correctW t1DKW
**less time used for correct answers than for incorrect and DK





*************************************************************************************************************************
*****MANUSCRIPT ANALYSES
*************************************************************************************************************************

*Table 1 Predictors of response time of DK answers
regress t1DKW female age i.educ_r  nfc   polint duration 
regress t1DKW  age i.educ_r  nfc  female#polint duration 

*Figure 1 
margins female#polint
marginsplot, scheme(s2mono)


*************************************************************************************************************************
*****APPENDIX
*************************************************************************************************************************

*Table A1. The socio-demographic profile of the sample included in the regression model in comparison to the CIS3117 sample collected in the same period, percentages
/* Data by the Centro de Investigaciones Sociológicas (CIS) is open access. Barometer CIS3117 can be downloaded here: https://www.cis.es/cis/opencm/ES/1_encuestas/estudios/ver.jsp?estudio=14245&cuestionario=17105&muestra=22653*/
recode age (18/24=1) (25/34=2) (35/44=3) (45/54=4) (55/65=5) (66/100=6), gen(tabage)
tab age tabage
recode p4 (1/2=1) (3/6=2) (7=3), gen(tabeduca)
tab p4 tabeduca
recode p6 (1/2=1) (3=2) (4=3) (5=4) (6=5) (7=1), gen(tabocu)
tab p6 tabocu
recode p9 (1=4) (2=3) (3=2) (4=1) (8=.), gen(tabpolint)
tab p9 tabpolint

*Table B1 – Comparison of the socio-demographic profile of the total sample and the sample included in the models
regress t1DKW female age i.educ_r  nfc   polint duration 
tab1 tabage tabeduca tabocu if e(sample)
sum tabpolint if e(sample)

*Table B2. Replication of the main analysis with a modified dependent variable in which responses that run out of time are sent to missing.
tab t1DKW, m
recode p20 (999=1) (else=0), gen(p20m)
recode p21 (999=1) (else=0), gen(p21m)
recode p22 (999=1) (else=0), gen(p22m)
recode p23 (999=1) (else=0), gen(p23m)
recode p28 (999=1) (else=0), gen(p28m)
recode p29 (999=1) (else=0), gen(p29m)
recode p24_1 (999=1) (else=0), gen(p24_1m)
recode p24_2 (999=1) (else=0), gen(p24_2m)
recode p24_3 (999=1) (else=0), gen(p24_3m)
recode p24_4 (999=1) (else=0), gen(p24_4m)
recode p24_5 (999=1) (else=0), gen(p24_5m)
recode p24_6 (999=1) (else=0), gen(p24_6m)
recode p24_7 (999=1) (else=0), gen(p24_7m)
recode p24_8 (999=1) (else=0), gen(p24_8m)
recode p24_9 (999=1) (else=0), gen(p24_9m)
recode p27_1 (999=1) (else=0), gen(p27_1m)
recode p27_2 (999=1) (else=0), gen(p27_2m)
recode p27_3 (999=1) (else=0), gen(p27_3m)
recode p27_4 (999=1) (else=0), gen(p27_4m)
gen t1DKWrobust=t1DKW
replace t1DKWrobust=. if p20m==1 | p21m==1 | p22m==1 | p23m==1 | p28m==1 | p29m==1 | p24_1m==1 | p24_2m==1 | p24_3m==1 | p24_4m==1 | p24_5m==1 | p24_6m==1 | p24_7m==1 | p24_8m==1 | p24_9m==1 | p27_1m==1 | p27_2m==1 | p27_3m==1 | p27_4m==1

regress t1DKWrobust female age i.educ_r  nfc  polint duration 
regress t1DKWrobust  age i.educ_r  nfc  female##polint duration 
regress t1DKWrobust female age i.educ_r  nfc  sde1_r duration 
regress t1DKWrobust  age i.educ_r  nfc  female##sde1_r duration 

*Table B3. Estimates including political information
regress t1DKW female age i.educ_r  nfc  sde1_r duration 
regress t1DKW  age i.educ_r nfc female#i.sde1_r duration

*Figure B1. Marginal effects of political information and gender on DK response time
margins female#sde1_r
marginsplot, scheme(s2mono)

*Table B4. Political knowledge in Spain. Number of correct answers to 19 political knowledge questions according to gender and political interest
regress correct_t1 female age i.educ_r  nfc  polint duration 
